home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UNIXTOOL / UNIXLIB37B / !UnixLib37_src_clib_h_limits < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-09  |  5.7 KB  |  183 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/clib/h/RCS/limits,v $
  4.  * $Date: 1996/10/30 21:58:58 $
  5.  * $Revision: 1.4 $
  6.  * $State: Rel $
  7.  * $Author: unixlib $
  8.  *
  9.  * $Log: limits,v $
  10.  * Revision 1.4  1996/10/30 21:58:58  unixlib
  11.  * Massive changes made by Nick Burret and Peter Burwood.
  12.  *
  13.  * Revision 1.3  1996/07/21 22:15:12  unixlib
  14.  * CL_0001 Nick Burret
  15.  * Improve memory handling. Remove C++ library incompatibilities.
  16.  * Improve file stat routines.
  17.  *
  18.  * Revision 1.2  1996/05/06 09:01:33  unixlib
  19.  * Updates to sources made by Nick Burrett, Peter Burwood and Simon Callan.
  20.  * Saved for 3.7a release.
  21.  *
  22.  * Revision 1.1  1996/04/19 21:02:57  simon
  23.  * Initial revision
  24.  *
  25.  ***************************************************************************/
  26.  
  27. /* ANSI Standard 4.14/2.2.4.2: Limits of integral types <limits.h>.  */
  28.  
  29. #ifndef __LIMITS_H
  30. #define __LIMITS_H
  31.  
  32.  
  33. /* Number of bits in a 'char'.  */
  34. #define CHAR_BIT    8
  35. /* Minimum value that can be represented by a 'signed char'.  */
  36. #define SCHAR_MIN    (-0x80)
  37. /* Maximum values that can be represented by a 'signed char'
  38.    and 'unsigned char', respectively.  */
  39. #define SCHAR_MAX    0x7f
  40. #define UCHAR_MAX    0xff
  41. /* Minimum and maximum values that can be represented by a 'char'.  */
  42. #define CHAR_MIN    0x00
  43. #define CHAR_MAX    0xff
  44.  
  45. /* Maximum length of a multibyte character.  */
  46. #define MB_LEN_MAX    1
  47.  
  48. /* Minimum value that can be represented by a 'signed short int'.  */
  49. #define SHRT_MIN    (short)(0x8000U)
  50. /* Maximum values that can be represented by a 'signed short int'
  51.    and 'unsigned short int', respectively.  */
  52. #define SHRT_MAX    0x7fff
  53. #define USHRT_MAX    0xffffU
  54.  
  55. /* Minimum value that can be represented by a 'signed int'.  */
  56. #define INT_MIN     (int)(0x80000000U)
  57. /* Maximum values that can be represented by a 'signed int'
  58.    and 'unsigned int'.  */
  59. #define INT_MAX     0x7fffffff
  60. #define UINT_MAX    0xffffffffU
  61.  
  62. /* The number of bits in a 'long int'.  */
  63. #define LONGBITS 32
  64. /* Minimum value that can be represented by a 'signed long int'.  */
  65. #define LONG_MIN    (long)(0x80000000UL)
  66. /* Maximum values that can be represented by a 'signed long int'
  67.    and 'unsigned long int'.  */
  68. #define LONG_MAX    0x7fffffffL
  69. #define ULONG_MAX    0xffffffffUL
  70.  
  71. #ifdef __GNUC__
  72. /* For GNU C long long compatibility only.  */
  73.  
  74. /* The minimum value that can be represented by a
  75.    'signed long long int'.  */
  76. #define LONG_LONG_MIN 0x8000000000000000LL
  77. /* The maximum values that can be represented by a
  78.    'signed long long int' and 'unsigned long long int'.  */
  79. #define LONG_LONG_MAX 0x7fffffffffffffffLL
  80. #define ULONG_LONG_MAX 0xffffffffffffffffULL
  81.  
  82. #endif
  83.  
  84.  
  85. /* POSIX Standard 2.9.2: Minimum Values <limits.h>.  */
  86.  
  87. /* These are the standard-mandated minimum values.  */
  88.  
  89. /* Maximum length of arguments to `execve', including environment.  */
  90. #define    _POSIX_ARG_MAX        1024
  91. #define ARG_MAX _POSIX_ARG_MAX
  92.  
  93. /* Maximum simultaneous processes per real user ID.  */
  94. #define    _POSIX_CHILD_MAX    1
  95. #define CHILD_MAX _POSIX_CHILD_MAX
  96.  
  97. /* Maximum link count of a file.  */
  98. #define    _POSIX_LINK_MAX        1
  99. #define LINK_MAX _POSIX_LINK_MAX
  100.  
  101. /* Number of bytes in a terminal canonical input queue.  */
  102. #define    _POSIX_MAX_CANON    256
  103. #define MAX_CANON _POSIX_MAX_CANON
  104.  
  105. /* Number of bytes for which space will be
  106.    available in a terminal input queue.  */
  107. #define    _POSIX_MAX_INPUT    256
  108. #define MAX_INPUT _POSIX_MAX_INPUT
  109.  
  110. /* Number of simultaneous supplementary group IDs per process.  */
  111. #define    _POSIX_NGROUPS_MAX    0
  112. #define NGROUPS_MAX _POSIX_NGROUPS_MAX
  113.  
  114. /* Number of files one process can have open at once.
  115.    Keep in sync with <stdio.h>, FOPEN_MAX.  */
  116. #define    _POSIX_OPEN_MAX        64
  117. #define OPEN_MAX _POSIX_OPEN_MAX
  118.  
  119. /* Number of bytes in a filename.
  120.    Keep in sync with <stdio.h>, FILENAME_MAX.  */
  121. #define    _POSIX_NAME_MAX        252
  122. #define NAME_MAX _POSIX_NAME_MAX
  123.  
  124. /* Number of bytes in a pathname.  */
  125. #define    _POSIX_PATH_MAX        256
  126. #define PATH_MAX _POSIX_PATH_MAX
  127.  
  128. /* Number of bytes than can be written atomically to a pipe.  */
  129. #define    _POSIX_PIPE_BUF        512
  130. #define PIPE_BUF _POSIX_PIPE_BUF
  131.  
  132. /* Largest value of a `ssize_t'.  */
  133. #define    _POSIX_SSIZE_MAX    INT_MAX
  134. #define SSIZE_MAX _POSIX_SSIZE_MAX
  135.  
  136. /* Number of streams a process can have open at once.  */
  137. #define    _POSIX_STREAM_MAX    8
  138. #define STREAM_MAX _POSIX_STREAM_MAX
  139.  
  140. /* Maximum length of a timezone name (element of `tzname').  */
  141. #define    _POSIX_TZNAME_MAX    3
  142. #define TZNAME_MAX _POSIX_TZNAME_MAX
  143.  
  144.  
  145. /* POSIX2 limits.  */
  146.  
  147. /* The maximum `ibase' and `obase' values allowed by the `bc' utility.  */
  148. #define    _POSIX2_BC_BASE_MAX    99
  149. #define    BC_BASE_MAX    _POSIX2_BC_BASE_MAX
  150.  
  151. /* The maximum number of elements allowed in an array by the `bc' utility.  */
  152. #define    _POSIX2_BC_DIM_MAX    2048
  153. #define    BC_DIM_MAX    _POSIX2_BC_DIM_MAX
  154.  
  155. /* The maximum `scale' value allowed by the `bc' utility.  */
  156. #define    _POSIX2_BC_SCALE_MAX    99
  157. #define    BC_SCALE_MAX    _POSIX2_BC_SCALE_MAX
  158.  
  159. /* The maximum length of a string constant accepted by the `bc' utility.  */
  160. #define    _POSIX2_BC_STRING_MAX    1000
  161. #define    BC_STRING_MAX    _POSIX2_BC_STRING_MAX
  162.  
  163. /* The maximum number of weights that can be assigned to an entry of
  164.    the LC_COLLATE category `order' keyword in a locale definition.  */
  165. #define    _POSIX2_EQUIV_CLASS_MAX    2
  166. #define    EQUIV_CLASS_MAX    _POSIX2_EQUIV_CLASS_MAX
  167.  
  168. /* The maximum number of expressions that can be nested
  169.    within parentheses by the `expr' utility.  */
  170. #define    _POSIX2_EXPR_NEST_MAX    32
  171. #define    EXPR_NEST_MAX    _POSIX2_EXPR_NEST_MAX
  172.  
  173. /* The maximum length, in bytes, of an input line.  */
  174. #define    _POSIX2_LINE_MAX    2048
  175. #define    LINE_MAX    _POSIX2_LINE_MAX
  176.  
  177. /* The maximum number of repeated occurrences of a regular expression
  178.    permitted when using the interval notation `\{M,N\}'.  */
  179. #define    _POSIX2_RE_DUP_MAX    255
  180. #define RE_DUP_MAX _POSIX2_RE_DUP_MAX
  181.  
  182. #endif
  183.